package com.zh.proxymode.services.staticproxy;

import com.zh.proxymode.services.staticproxy.impl.HouseOfZH;

//代理类，代理（且只能代理）HouseOfZH来实现Sell的功能
public class StaticIntermediary {
    private HouseOfZH house;

    public StaticIntermediary(HouseOfZH house) {
        this.house = house;
    }

    public void Sell(){
        this.house.Sell();
        ShowHouse();
        SellHouse();
    }
    private void ShowHouse(){
        System.out.println("带客户看房子");
    }

    private void SellHouse(){
        System.out.println("办过户手续，抽取佣金");
    }
}
